<?php

class StdoutLogger implements Ezer_Logger
{
	public function log($text)
	{
		$backtraceIndex = 3;
		$backtrace = debug_backtrace();
		$mothod = 'global';
		if (isset($backtrace[$backtraceIndex]))
		{
			if (isset($backtrace[$backtraceIndex]["class"]))
				$mothod = $backtrace[$backtraceIndex]["class"] . $backtrace[$backtraceIndex]["type"] . $backtrace[$backtraceIndex]["function"];
			else
				$mothod = $backtrace[$backtraceIndex]["function"];
		}
		
		echo "[$mothod] $text\n";
	}
}